package com.atguigu.spring.scope;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

class TestScope {

	@Test
	void test() {
		@SuppressWarnings("resource")
		ApplicationContext ctx = new ClassPathXmlApplicationContext("spring-scope.xml");
		
		Car car1 = ctx.getBean("car",Car.class);
		Car car2 = ctx.getBean("car",Car.class);
		System.out.println(car1 == car2);
	}

}
